<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>收藏</title>
    <link rel="stylesheet" type="text/css" href="__CSS__api.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__aui.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__dropload.css" />

    <style>
        .aui-bar-nav .aui-iconfont {
            position: relative;
            font-family: "aui_iconfont" !important;
            font-size: 0.75rem;
            color: #E73C5C;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            height: 2.4rem;
        }

        .aui-bar-nav {
            background-color: #fff;
        }

        .aui-icon-tu {
            height: 2.4rem;
            width: 49px;
            background: url('__IMG__left.png') no-repeat 0.5rem center;
            background-size: 22px 22px;
        }

        .aui-bar-nav .aui-pull-right {
            padding-right: 0.75rem;
        }

        .aui-bar-nav .aui-title {
            font-size: 0.9rem;
            color: #333333;
            font-weight: 500;
        }
        /*tab*/

        .aui-tab-item.aui-active {
            color: #E73C5C;
            font-weight: bold;
            font-size: 0.8rem;
            position: relative;
            border: 0;
        }

        .aui-active:after {
            content: '';
            display: block;
            height: 0px;
            width: 100%;
            border-top: 2px solid #E73C5C;
            bottom: 0px;
            left: 0;
            position: absolute;
        }

        .sss {
            margin: 0px 15px;
            width: 100%;
        }

        .aui-tab-item {
            height: 2.4rem;
            line-height: 2.4rem;
            font-size: 0.8rem;
            color: #333;
        }
        body {
            background-color: #F5F5F5;
        }

        .right {
            position: relative;
        }

        .warrp {
            width: 100%;
            padding: 0 0.75rem;
            background-color: #fff;
        }

        .cooc {
            width: 100%;
            padding: 0.75rem 0;
            position: relative;
            background-color: #fff;
            /*left: 2rem;*/
        }
        /*/看样式 无意义/*/
        .cooc1 {
            width: 100%;
            padding: 0.75rem 0;
            position: relative;
            background-color: #fff;
            left: 2rem;
        }
        /*/看样式 无意义/*/
        .outAll {
            position: relative;
            z-index: 1;
        }

        .header {
            width: 4.8rem;
            width: 4.8rem;
            border-radius: 0.25rem;
        }

        .header img {
            width: 4.8rem;
            width: 4.8rem;
            border-radius: 0.25rem;
        }

        .title {
            font-size: 0.75rem;
            color: #333333;
            line-height: 0.85rem;
            font-weight: bold;
        }

        .cont {
            font-size: 0.7rem;
            color: #666666;
            line-height: 1.4rem;
        }

        .timefrom {
            display: flex;
            justify-content: space-between;
            font-size: 0.6rem;
            color: rgba(153, 153, 153, 1);
            position: absolute;
            bottom: 0;
            width: 100%;
        }

        .time {
            float: right;
        }

        .container {
            width: 100%;
            height: 3.5rem;
            background: #fff;
            position: fixed;
            bottom: 0;
            z-index: 1;
        }

        .signUp {
            width: 91.6%;
            height: 2.5rem;
            line-height: 2.5rem;
            font-size: 0.8rem;
            font-weight: 500;
            color: #fff;
            text-align: center;
            margin: 0.5rem auto;
            border-radius: 0.25rem;
        }

        .select {
            width: 2.75rem;
            background-color: #fff;
            z-index: 0;
            position: absolute;
            left: -0.75rem;
            top: 0;
            height: 100%;
        }

        input[type="checkbox"] {
            -webkit-appearance: none;
            width: 100%;
            height: 100%;
            vertical-align: middle;
            background: #fff url(__IMG__uncheck.png) no-repeat center center;
            /*复选框的背景图，就是上图*/
            background-size: 1.1rem 1.1rem;
        }

        input[type="checkbox"]:checked {
            -webkit-appearance: none;
            width: 100%;
            height: 100%;
            vertical-align: middle;
            background: #fff url(__IMG__checked.png) no-repeat center center;
            /*复选框的背景图，就是上图*/
            background-size: 1.1rem 1.1rem;
        }

        .activity {
            padding: 0 0.7rem;
            background: #fff;
        }

        .activityImg {
            width: 4.825rem;
            height: 4.825rem;
            border-radius: 0.3rem;
            margin-right: 0.8rem;
        }

        .showImg {
            width: 100%;
            height: 100%;
        }

        .activityContent {
            height: 4.825rem;
            position: relative;
        }

        .activityTitle {
            color: #333;
            font-size: 0.8rem;
            margin-bottom: 0.2rem;
        }

        .box {
            margin-bottom: 0.25rem;
            height: 0.65rem;
            line-height: 0.65rem;
            display: flex;
            align-items: center;
        }

        .destination,
        .activityTime {
            color: #999;
            font-size: 0.65rem;
        }

        .logo1 {
            width: 0.65rem;
            height: 0.65rem;
            background: url(__IMG__location.png) no-repeat center center;
            background-size: 100% 100%;
            margin-right: 0.2rem;
        }

        .logo2 {
            width: 0.65rem;
            height: 0.65rem;
            background: url(__IMG__clock.png) no-repeat center center;
            background-size: 100% 100%;
            margin-right: 0.2rem;
        }

        .report {
            padding-top: 0.5rem;
            width: 100%;
            position: absolute;
            bottom: 0;
        }

        .signUp3 {
            text-align: center;
            font-size: 0.65rem;
            color: #FFBA71;
            padding-top: 20px;
        }

        .signUp1 {
            text-align: ;
            font-size: 0.65rem;
            color: #24A8FC;
            padding-top: 1rem;
        }

        .signUp2 {
            text-align: right;
            font-size: 0.65rem;
            color: #999;
            padding-top: 1rem;
        }

        .xian {
            width: 0.75rem;
            height: 0.75rem;
            display: inline-block;
            vertical-align: middle;
        }

        .moreActivity {
            width: 100%;
            height: 2.7rem;
            line-height: 2.7rem;
            color: #999;
            font-size: 0.7rem;
            text-align: center;
        }

        .juli {
            margin-bottom: 0.5rem;
        }

        .activityDetails {
            padding: 0.75rem 0 0.75rem 0;
            background-color: #fff;
            position: relative;
            left: 0;
        }
        /*/看样式 无意义/*/

        .activityDetails1 {
            padding: 0.75rem 0 0.75rem 0;
            background-color: #fff;
            position: relative;
            left: 2rem;
        }
        /*/看样式 无意义/*/

        .jiangzuo {
            border-radius: 0.2rem;
            color: #ccc;
            font-size: 20px;
            padding: 0.2rem 0.5rem;
            display: inline-block;
            border: 1px solid #E6E6E6;
            font-weight: normal;
            transform-origin: bottom left;
            -webkit-transform-origin: bottom left;
            -ms-transform-origin: bottom left;
            -moz-transform-origin: bottom left;
            -o-transform-origin: bottom left;
            transform: rotate(7deg);
            -ms-transform: scale(0.5);
            /* IE 9 */
            -moz-transform: scale(0.5);
            /* Firefox */
            -webkit-transform: scale(0.5);
            -o-transform: scale(0.5);
        }

        .container {
            width: 100%;
            height: 3.5rem;
            background: #fff;
            position: fixed;
            bottom: 0;
            z-index: 1;
        }

        .delete {
            width: 91.6%;
            height: 2.5rem;
            line-height: 2.5rem;
            font-size: 0.8rem;
            font-weight: 500;
            color: #fff;
            background: #E73C5C;
            text-align: center;
            margin: 0.5rem auto;
            border-radius: 0.25rem;
        }

        .select {
            width: 2.75rem;
            background-color: #fff;
            z-index: 0;
            position: absolute;
            left: -0.75rem;
            top: 0;
            height: 100%;
        }

        input[type="checkbox"] {
            -webkit-appearance: none;
            width: 100%;
            height: 100%;
            vertical-align: middle;
            background: #fff url(__IMG__uncheck.png) no-repeat center center;
            /*复选框的背景图，就是上图*/
            background-size: 1.1rem 1.1rem;
        }

        input[type="checkbox"]:checked {
            -webkit-appearance: none;
            width: 100%;
            height: 100%;
            vertical-align: middle;
            background: #fff url(__IMG__checked.png) no-repeat center center;
            /*复选框的背景图，就是上图*/
            background-size: 1.1rem 1.1rem;
        }

        .outAll {
            position: relative;
            z-index: 1;
        }
    </style>
</head>

<body>
<div class="l_box"  id="loading2"><img src="__IMG__loading.gif" alt="" id="loading"></div>

<header class="aui-bar aui-bar-nav underLine" style="padding-top:25px;" id="header">
    <a class="aui-pull-left" tapmode="active" onclick="history.go(-1)"> <span class="aui-iconfont aui-icon-tu"> </span> </a>
    <div class="aui-title">收藏</div>
    <a class="aui-pull-right">
        <span class="aui-iconfont" style='color:#333333;' tapmode="active" onclick="right()" id="edit">编辑</span>
    </a>
</header>
<div class="aui-tab bar underLine" id="tab1">
    <div class="underLine sss aui-tab" id="tab">
        <div class="aui-tab-item" id="zx" onclick="zx()">资讯</div>
        <div class="aui-tab-item  aui-active" id="hd">活动</div>
    </div>
</div>
<div class="upOrDown"  style="margin-bottom: 3rem;">
    <div class="upOrDown_data">
        <div class="zix hidden" id="zixun">
            <div class="kong" style="margin-top:5.8rem" >
                <img src="__IMG__quesheng/no_collect.png" class="">
                <div class="seatName1">暂无资讯</div>
            </div>
            <div class="warrp"  id="zixunlist">
                <!--<div class="outAll">-->
                    <!--<div class="select"><input type="checkbox" name="zixun" checked></div>-->
                    <!--<div class="cooc underLine flex-wrap">-->
                        <!--<div class="header">-->
                            <!--<img src="__IMG__jingtaitu/main1_pinglun.png" alt="">-->
                        <!--</div>-->
                        <!--<div class="right flex-con" style="margin-left:0.8rem">-->
                            <!--<div class="title aui-ellipsis-1">-->
                                <!--这里是标题一共有亿行行行行行这里是标题一共有亿行行行行行...-->
                            <!--</div>-->
                            <!--<div class="cont aui-ellipsis-1" style="">-->
                                <!--于2007专业人员弘这里是标题一共有亿行行行行行...-->
                            <!--</div>-->
                            <!--<div class="timefrom">-->
                                <!--<div class="from">-->
                                    <!--资讯来源-->
                                <!--</div>-->
                                <!--<div class="time">-->
                                    <!--2018-12-23-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="outAll" style="margin-bottom: 3rem;">-->
                    <!--<div class="select"><input type="checkbox" name="zixun" checked></div>-->
                    <!--<div class="cooc underLine flex-wrap">-->
                        <!--<div class="header">-->
                            <!--<img src="__IMG__jingtaitu/main1_pinglun.png" alt="">-->
                        <!--</div>-->
                        <!--<div class="right flex-con" style="margin-left:0.8rem">-->
                            <!--<div class="title aui-ellipsis-1">-->
                                <!--这里是标题一共有亿行行行行行这里是标题一共有亿行行行行行...-->
                            <!--</div>-->
                            <!--<div class="cont aui-ellipsis-1" style="">-->
                                <!--于2007专业人员弘这里是标题一共有亿行行行行行...-->
                            <!--</div>-->
                            <!--<div class="timefrom">-->
                                <!--<div class="from">-->
                                    <!--资讯来源-->
                                <!--</div>-->
                                <!--<div class="time">-->
                                    <!--2018-12-23-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            </div>

        </div>

        <div class="activ" id="atcive">
            <div class="kong" style="margin-top:5.8rem" >
                <img src="__IMG__quesheng/no_collect.png" class="">
                <div class="seatName1">暂无</div>
            </div>
            <div class="activity" id="huodonglist">
                <!--<div class="outAll">-->
                    <!--<div class="select"><input type="checkbox" name="zixun" checked></div>-->
                    <!--<div class="activityDetails flex-wrap underLine2" onclick="fnActive()" tapmode='acdtive'>-->
                        <!--<div class="activityImg"><img src="__IMG__jingtaitu/jigoufengcai.png" class="showImg"></div>-->
                        <!--<div class="activityContent flex-con">-->
                            <!--<div class="activityTitle aui-ellipsis-1">陪父母看看书聊聊天也是...</div>-->
                            <!--<div class="box">-->
                                <!--<div class="logo1"></div>-->
                                <!--<div class="destination aui-ellipsis-1">朝阳去元臣国际酒店1908会议...</div>-->
                            <!--</div>-->
                            <!--<div class="box">-->
                                <!--<div class="logo2"></div>-->
                                <!--<div class="activityTime">08-21&nbsp;&nbsp;&nbsp;20:00至23:00</div>-->
                            <!--</div>-->
                            <!--<div class="report flex-wrap">-->
                                <!--<div class="jiangzuo">专题讲座</div>-->
                                <!--<div class="signUp1 flex-con">-->
                                    <!--<img src="__IMG__main1_jin.png" alt="" class="xian">进行中-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="outAll">-->
                    <!--<div class="select"><input type="checkbox" name="zixun" checked></div>-->
                    <!--<div class="activityDetails flex-wrap underLine2" onclick="fnActive()" tapmode='acdtive'>-->
                        <!--<div class="activityImg"><img src="__IMG__jingtaitu/jigoufengcai.png" class="showImg"></div>-->
                        <!--<div class="activityContent flex-con">-->
                            <!--<div class="activityTitle aui-ellipsis-1">陪父母看看书聊聊天也是...</div>-->
                            <!--<div class="box">-->
                                <!--<div class="logo1"></div>-->
                                <!--<div class="destination aui-ellipsis-1">朝阳去元臣国际酒店1908会议...</div>-->
                            <!--</div>-->
                            <!--<div class="box">-->
                                <!--<div class="logo2"></div>-->
                                <!--<div class="activityTime">08-21&nbsp;&nbsp;&nbsp;20:00至23:00</div>-->
                            <!--</div>-->
                            <!--<div class="report flex-wrap">-->
                                <!--<div class="jiangzuo">专题讲座</div>-->
                                <!--<div class="signUp1 flex-con">-->
                                    <!--<img src="__IMG__main1_jin.png" alt="" class="xian">进行中-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="outAll" style="margin-bottom: 3rem;">-->
                    <!--<div class="select"><input type="checkbox" name="zixun" checked></div>-->
                    <!--<div class="activityDetails flex-wrap underLine2" onclick="fnActive()" tapmode='acdtive'>-->
                        <!--<div class="activityImg"><img src="__IMG__jingtaitu/jigoufengcai.png" class="showImg"></div>-->
                        <!--<div class="activityContent flex-con">-->
                            <!--<div class="activityTitle aui-ellipsis-1">陪父母看看书聊聊天也是...</div>-->
                            <!--<div class="box">-->
                                <!--<div class="logo1"></div>-->
                                <!--<div class="destination aui-ellipsis-1">朝阳去元臣国际酒店1908会议...</div>-->
                            <!--</div>-->
                            <!--<div class="box">-->
                                <!--<div class="logo2"></div>-->
                                <!--<div class="activityTime">08-21&nbsp;&nbsp;&nbsp;20:00至23:00</div>-->
                            <!--</div>-->
                            <!--<div class="report flex-wrap" >-->
                                <!--<div class="jiangzuo">专题讲座</div>-->
                                <!--<div class="signUp2 flex-con">-->
                                    <!--未开始-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            </div>

        </div>
    </div>
</div>
<div class="container topLine hidden shanchu"  onclick="deletezixun()" tapmode='active'>
    <div class="delete">删除</div>
</div>
<div class="container topLine hidden shanchu" onclick="deletehd()" tapmode='active'>
    <div class="delete">删除</div>
</div>
<div class="toast-wrap">
    <span class="toast-msg"></span>
</div>
</body>

<script type="text/javascript" src="__JS__jquery.min.js"></script>
<script type="text/javascript" src="__JS__layer_mobile/layer.js"></script>
<script type="text/javascript" src="__JS__dropload.min.js"></script>
<script type="text/javascript" src="__JS__api.js"></script>
<script type="text/javascript" src="__JS__tt.js"></script>

<script type="text/javascript" src="__JS__common.js"></script>

<script type="text/javascript">
    // 获取资讯与活动信息
    // getdata();
    // function getdata() {
    //     getdata_zixun();
    //     // getdata_hd();
    // }
    var shouindex=1;
    function zx(){
        location.href='{:url("My/shouce")}';

    }
    function hd(){
        var cooc1=document.getElementsByClassName('cooc');
        var cooc2=document.getElementsByClassName('underLine2');
        shouindex=1;
        edit.innerHTML='编辑';
        for (var i=0;i<cooc2.length;i++) {
            cooc2[i].style.left='0rem';
        }
        shanchu[1].style.display='none';
        document.getElementById("zixun").className='zix hidden';
        document.getElementById("atcive").className='activ';
        document.getElementById("zx").className='aui-tab-item';
        document.getElementById("hd").className='aui-tab-item aui-active';
    }
    var edit=document.getElementById("edit");
    var shanchu=document.getElementsByClassName('shanchu');

    function right(){

        var cooc1=document.getElementsByClassName('cooc');
        var cooc2=document.getElementsByClassName('underLine2');

        if (shouindex==0) {
            if(edit.innerHTML=='编辑'){
                edit.innerHTML='取消';
                for (var i=0;i<cooc1.length;i++) {
                    cooc1[i].style.left='2rem';
                }
                shanchu[0].style.display='block';
                console.log(shanchu[0].style.display);
            }else {
                edit.innerHTML='编辑';
                for (var i=0;i<cooc1.length;i++) {
                    cooc1[i].style.left='0rem';
                }
                shanchu[0].style.display='none';
                console.log(shanchu[0].style.display);
            }
        }else {
            if(edit.innerHTML=='编辑'){
                edit.innerHTML='取消';
                for (var i=0;i<cooc2.length;i++) {
                    cooc2[i].style.left='2rem';
                }
                shanchu[1].style.display='block';
            }else {
                edit.innerHTML='编辑';
                for (var i=0;i<cooc2.length;i++) {
                    cooc2[i].style.left='0rem';
                }
                shanchu[1].style.display='none';
            }
        }
    }
    //   ajax获取资讯数据myCollect
    function getdata_zixun() {
        loaddingOpen();
        var data={
            type:1,
            page:1
        };
        console.log(data);
        $.ajax({
            url:'{:url("My/myCollect")}',
            type: 'post',
            data:data,
            dataType:'JSON',
            success: function (data) {
                loaddingClose();
                console.log(data);
                if (data.status==200) {
                    if (data.data.length>0){
                        getlist_zixun(data.data);
                    }else {

                        $('#huodonglist').html('');
                        $('.kong').eq(0).show();
                    }
                }else {

                }
            },
            error: function(xhr, type){
                loaddingClose();

                toast('无网络或连接超时，请重试！');
                // 即使加载出错，也得重置

            }
        });


    }
    var page=0;
    /**
     * 上拉加载，下拉刷新
     */
    var dropload = $('.upOrDown').dropload({
        scrollArea : window,
        autoLoad : true,
//        domUp : {
//            domClass   : 'dropload-up',
//            domRefresh : '<div class="dropload-refresh">↓下拉刷新-自定义内容</div>',
//            domUpdate  : '<div class="dropload-update">↑释放更新-自定义内容</div>',
//            domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中-自定义内容...</div>'
//        },
//        domDown : {
//            domClass   : 'dropload-down',
//            domRefresh : '<div class="dropload-refresh">刷新</div>',
//            domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
//            domNoData  : '<div class="dropload-noData">无数据</div>'
//        },
        loadDownFn : function(me){
            console.log(1);
            page++;
            var data={
                type:2,
                page:page
            };
            console.log(data);
            $.ajax({
                url:'{:url("My/myCollect")}',
                type: 'post',
                data:data,
                type:'POST',
                dataType:'JSON',
                success: function(data){
                    var arrLen = data.data.length;
                    if(arrLen<=0){
                        me.lock();
//                         无数据
                        me.noData(true);
                        // 每次数据加载完，必须重置
                        me.resetload();
                    }else{
                        var datas = data.data;
                        huodonglist(datas);

                        // 每次数据加载完，必须重置
                        me.resetload();
                    }


                },
                error: function(xhr, type){
                    alert('Ajax error!');
                    // 即使加载出错，也得重置
                    me.resetload();
                }
            });
        },
        loadUpFn : function(me){
            // var keyword = $('input[name="cate_id"]').val();

            page = 1;
            var data={
                type:2,
                page:page
            };
            console.log(data);
            $.ajax({
                url:'{:url("My/myCollect")}',
                type: 'post',
                data:data,
                type:'POST',
                dataType:'json',
                success: function(data){
                    console.log(data);
                    var datas = data.data;
                    $('#huodonglist').html('');
                    huodonglist(datas);

                    me.resetload();
                    me.unlock();
                    me.noData(false);
                },
                error: function(xhr, type){
                    // alert('Ajax error!');
                    me.resetload();
                }
            });
        }
    });


    // 资讯数据列表化
    function getlist_zixun(data) {
        var html='';
        for (var i=0;i<data.length;i++) {
            html+='<div class="outAll">';
            html+='<div class="select"><input class="zixunbutton" type="checkbox" name="zixun" checked data-id="'+data[i].collect_id+'"></div>';
            html+='<div class="cooc underLine flex-wrap" onclick="opendetail('+data[i].information_id+')">';
            html+='<div class="header">';
            html+='<img src="'+data[i].information_img+'" alt="">';
            html+='</div>';
            html+='<div class="right flex-con" style="margin-left:0.8rem">';
            html+='<div class="title aui-ellipsis-1">'+data[i].information_title+'</div>';
            html+=' <div class="cont aui-ellipsis-1" style="">'+data[i].information_introduce+'</div>';
            html+='<div class="timefrom">';
            html+='<div class="from">资讯来源 </div>';
            html+=' <div class="time">'+data[i].information_release_time+'</div>';
            html+='</div></div></div>';
        }
        $('#zixunlist').html(html);

    }

    // 活动数据列表化

    function huodonglist(data) {
        var html='';
        for (var i=0;i<data.length;i++) {
            html+='<div class="outAll">';
            html+='<div class="select"><input class="zixunbutton" type="checkbox" name="zixun" checked data-id="'+data[i].collect_id+'"></div>';
            html+='<div class="activityDetails flex-wrap underLine2" onclick="opendetail('+data[i].id+')">';
            if (data[i].activity_img==''||data[i].activity_img==null) {
                html+='<div class="activityImg"><img src="__IMG__zhanweitu/active_list.png" class="showImg"></div>';

            }else {
                html+='<div class="activityImg"><img src="'+data[i].activity_img+'" class="showImg"></div>';

            }
            html+='<div class="activityContent flex-con">';
            html+='<div class="activityTitle aui-ellipsis-1">'+data[i].activity_name+'</div>';
            html+='<div class="box">';
            html+='<div class="logo1"></div>';
            html+='<div class="destination aui-ellipsis-1">'+data[i].activity_address+'</div>';
            html+='</div>';
            html+='<div class="box">';
            html+='<div class="logo2"></div>';
            html+='<div class="activityTime">'+data[i].activity_start_time+'至'+data[i].activity_end_time+'</div>';
            html+='</div>';
            html+='<div class="report flex-wrap">';
            html+='<div class="jiangzuo">专题讲座</div>';
            if(data[i].activity_status==1){
                html+='<div class="signUp2 flex-con">未开始</div>';
            }else if(data[i].activity_status==2){
                html+='<div class="signUp3 flex-con"><img src="__IMG__xian.png" alt="" class="xian">报名中</div>';

            }else if(data[i].activity_status==3){
                html+='<div class="signUp1 flex-con"><img src="__IMG__main1_jin.png" alt="" class="xian">进行中</div>';
            }else if(data[i].activity_status==4){
                html+='<div class="signUp2 flex-con">已结束</div>';
            }
            html+='</div></div></div></div>';

        }
        $('#huodonglist').append(html);

    }
    // 进入资讯详情
    function opendetail(id) {
        console.log(id);
        location.href = '{:url("First/activitydatail")}?activity_id='+id;


    }
    // 删除我的收藏之活动delCollect
    function deletehd() {
        var zixunbutton=document.getElementsByClassName('zixunbutton');
        var deletelist=[];
        for(var i=0;i<zixunbutton.length;i++){
            if (zixunbutton[i].checked) {
                deletelist.push(zixunbutton[i].dataset.id);
            }
        }
        if (deletelist.length==0) {
            toast('请选择要删除的选项');

            return;
        }
        console.log(deletelist);

        var str='';
        for (var i=0;i<deletelist.length;i++) {
            if (i==0) {
                str+=deletelist[i];
            }else {
                str+=',';
                str+=deletelist[i];

            }
        }

        loaddingOpen();
        var data2={
            type:2,
            ids:str
        };
        console.log(data2);
        $.ajax({
            url:'{:url("My/delCollect")}',
            type: 'post',
            data:data2,
            dataTpye:'JSON',
            success: function (data) {
                console.log(data);
                loaddingClose();
                alert(2);
                if (data.status==200||data.status=='200') {
                    alert(22);
                    toast('删除成功');
                    window.location.reload();
                }else {
                    alert(2233);
                    // toast(data.msg);
                }
            },
            error: function(xhr, type){
                loaddingClose();

                toast('无网络或连接超时，请重试！');
                // 即使加载出错，也得重置

            }
        });
    }
</script>

</html>
